<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:composite="http://java.sun.com/jsf/composite"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:faces="http://java.sun.com/jsf/composite/faces/components">
 
    <composite:interface>
    	<!-- Attributes for formItem -->
    	<composite:attribute name="id" type="java.lang.String"/>
    	<composite:attribute name="title" type="java.lang.String"/>
    	<composite:attribute name="style" type="java.lang.String"/>
    	<composite:attribute name="styleClass" type="java.lang.String"/>
    	<composite:attribute name="titleMessage" type="java.lang.String"/>
    	<composite:attribute name="titleMessageStyleClass" type="java.lang.String"/>
    	<composite:attribute name="closeable" type="java.lang.Boolean" default="false"/>
    	<composite:attribute name="closed" type="java.lang.Boolean" default="false"/>
	   	<!-- Attributes for inputItem -->
    </composite:interface>
 
    <composite:implementation>
	 	<div id="formBox" style="#{cc.attrs.style}"
	 		class="formBox #{cc.attrs.closeable and cc.attrs.closed ? 'formBox_closed' : ''} #{cc.attrs.styleClass}">
	 		<a4j:outputPanel layout="block" styleClass="title" rendered="#{not empty cc.attrs.title}">
	 			<a4j:outputPanel layout="block" styleClass="titleMessage #{cc.attrs.titleMessageStyleClass}"
	 				rendered="#{not empty cc.attrs.titleMessage}">#{cc.attrs.titleMessage}</a4j:outputPanel>
	 			#{cc.attrs.title}
	 			<a4j:outputPanel styleClass="form_box_tool_#{cc.attrs.closed ? 'down' : 'up'}" 
			 		title="#{cc.attrs.closed ? '点击展开此表单区块' : '点击关闭此表单区块'}"
			 		rendered="#{cc.attrs.closeable}"
			 		onclick="onion.faces.toggleFormBox(this);"/>
	 		</a4j:outputPanel>
	 		<composite:insertChildren/>
	 	</div>
    </composite:implementation>
</ui:composition>